package zz.champion_contest07;

public class Q2_Customer {
	//顾客静态属性：名字、年龄、所带金钱
	private String name;
	private int age;
	private int money;
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
	public int getMoney() {
		return money;
	}
	public void setMoney(int money) {
		this.money = money;
	}
	//顾客买的动作
	public void buy(Q2_Commodity commodity,int num,int money){
		Q2_Business b=new Q2_Business();
		setMoney(this.money-money+b.cashier(commodity, num, money));
	}
}